import { allResource, roomResource } from "../local/resource"
import { getStore } from "../local/store"

/* 与资源相关的 */
export default {
    resource:{
        all():string{
            allResource()
            return `[resource] 全局资源统计完毕!`
        },
        room(roomName:string):string{
            var thisRoom = Game.rooms[roomName]
            if (!thisRoom) return `[resource] 不存在房间${roomName}`
            roomResource(roomName)
            return `[resource] 房间${roomName}资源统计完毕!`
        },
    },
    store:{
        all():string{
            getStore()
            return `[store] 全局容量信息统计完毕!`
        },
        room(roomName:string):string{
            var thisRoom = Game.rooms[roomName]
            if (!thisRoom) return `[store] 不存在房间${roomName}`
            getStore(roomName)
            return `[store] 房间${roomName}容量信息统计完毕!`
        }
    },
}